Skip to content

Conversation

@TrevorBurgoyne
Copy link
Member

@TrevorBurgoyne TrevorBurgoyne commented Nov 3, 2025

Fix Vanish Mode

Description

  • Don't draw annotations when a subtask is vanished
  • Add configurable annotation_vanish_all_keybind
  • Track annotation size per subtask
    • Remove annotation size cookie, since it was tracking just one size per annotation session
    • Remove line_size property from the annotation object. Use the subtask line_size instead.
  • Deprecated the default_annotation_size argument in the configuration object. Use the initial_line_size argument instead. See api_spec.md for details.
  • Fix toolbox collapse arrow positioning, and make frame annotation dialogs disappear on collapse

Implements some functionality I initially implemented as part of #153, however the rest of that PR is pretty obsolete. Closes #153.

PR Checklist

  • Merged latest main
  • Version number in package.json has been bumped since last release
  • Version numbers match between package package.json and src/version.js
  • Ran npm install and npm run build AFTER bumping the version number
  • Updated documentation if necessary (currently just in api_spec.md)
  • Added changes to changelog.md

Breaking API Changes

  • Deprecated the default_annotation_size argument in the configuration object. Use the initial_line_size argument instead. See api_spec.md for details.
  • Removed the line_size property from annotation objects. subtask.state.line_size determined the size of drawn annotations within a subtask.

@TrevorBurgoyne TrevorBurgoyne added the bug Something isn't working label Nov 3, 2025
Base automatically changed from feature/keybinds to main November 17, 2025 17:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the vanish mode functionality and annotation sizing system to track line sizes per subtask rather than per annotation. It introduces a new keybind for toggling vanish mode across all subtasks, removes the deprecated default_annotation_size configuration, and fixes positioning issues with the toolbox collapse button.

Changes:

  • Moved annotation line size tracking from individual annotations to per-subtask state
  • Added annotation_vanish_all_keybind configuration option with shift+v default
  • Removed line_size property from annotation objects and deprecated default_annotation_size config
  • Fixed toolbox collapse button positioning to use absolute instead of fixed positioning

Reviewed changes

Copilot reviewed 19 out of 22 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/annotation.ts Removed line_size parameter from ULabelAnnotation class
src/configuration.ts Removed deprecated default_annotation_size, added annotation_vanish_all_keybind, changed default initial_line_size to 5
src/index.js Removed line_size initialization from annotations, moved to subtask state; updated get_scaled_line_size to use subtask line size
src/listeners.ts Added keybind handlers for annotation resizing that call AnnotationResizeItem methods
src/subtask.ts Added is_vanished and line_size properties to subtask state
src/toolbox.ts Refactored AnnotationResizeItem to use static methods and track line size per subtask; removed cookie-based size storage; fixed collapse button positioning
src/toolbox_items/keybinds.ts Added new "Toggle Vanish All" keybind entry and updated "Toggle Vanish" description
tests/annotation.test.js Removed assertion checking line_size on annotation object
tests/e2e/keybind-functionality.spec.js Updated vanish keybind test to check subtask state instead of annotation line_size
tests/testing-utils/init_utils.js Added return of ulabel instance from wait_for_ulabel_init
tests/testing-utils/subtask_utils.js Added get_current_subtask utility function
package.json Bumped version to 0.22.1, added baseline-browser-mapping dependency
api_spec.md Removed line_size from annotation spec, removed default_annotation_size documentation, updated initial_line_size default to 5
CHANGELOG.md Added 0.22.1 release notes with future date (Jan 13th, 2026)
demo files Removed line_size properties from example annotations
.github/tasks.md Updated tasks list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants